#define _CRT_SECURE_NO_WARNINGS  1
#include<stdio.h>
#include<string.h>
int my_strcmp(const char* a, const char* b)
{
	while (*a || *b)
	{
		if (*a++ != *b++)
		{
			if (*a > *b)
			{
				return 1;
			}
			else
			{
				return -1;
			}
		}
	}
	return 0;
}
int main()
{
	char a[] = "zjy";
	char a1[] = "zjy";
	char a2[] = "zjynb";
	printf("%d\n", strcmp(a, a1));
	printf("%d\n", strcmp(a, a2));
	printf("%d\n", strcmp(a2, a));
	printf("%d\n", my_strcmp(a, a1));
	printf("%d\n", my_strcmp(a, a2));
	printf("%d\n", my_strcmp(a2, a));
	return 0;
}